package com.ym.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Table
@TableComment("域名续费表")
public class DmDomainRenew {


    @TableId(type = IdType.ASSIGN_ID)
    @IsKey
    @Column
    @ColumnComment("主键ID")
    private Long id;

    @Column(length = 30)
    @ColumnComment("续费订单号(给第三方支付系统用)")
    private String renewOrderNo;

    @Column
    @ColumnComment("域名ID")
    @Index
    private Long domainId;

    @Column(length = 255)
    @ColumnComment("域名名称")
    private String domainName;

    @Column
    @ColumnComment("客户ID")
    private Integer customerId;

    @Column(length = 50)
    @ColumnComment("操作结果(续费中,续费成功,续费失败)")
    private String operationResult;

    @Column
    @ColumnComment("批次操作ID")
    private Long batchOperationId;

    @Column(length = 50)
    @ColumnComment("任务编号(第三方)")
    private String taskNo;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("续费费用(第三方平台费用+手续费)")
    private BigDecimal renewAmount;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("第三方平台费用")
    private BigDecimal registrarFee;

    @Column
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("手续费")
    private BigDecimal ourFee;

    @Column
    @ColumnComment("续费年限")
    private Short years;

    @Column
    @ColumnComment("续费到期时间")
    private LocalDateTime renewExpireTime;

}
